let baseURL = "http://192.168.1.168:3110"
const request = ({
	url,
	method,
	headers,
	data
}) => {
	return new Promise((resolve, reject) => {
		wx.request({
			url: baseURL + url,
			method: method || "GET",
			data: data || {},
			header: headers || {},
			success: (res) => {
				resolve(res.data)
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}
request.baseURL = baseURL
request.fileURL = `${baseURL}/common/api/upload`
module.exports = request
